<?php

namespace app\common\model;

use think\Model;

class Member extends Model
{

    public function inviter()
    {
        return $this->hasone(Member::class,'id','pid');
    }

    public function groupMoney()
    {
        return $this->hasMany(Member::class,'pid','id');
    }

    public function money()
    {
        return $this->hasMany(MemberMoney::class,'member_id','id');
    }

}
